package com.creative.user.domain.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

import static com.creative.core.domain.VerifyRegex.EMAIL;
import static com.creative.core.domain.VerifyRegex.PASSWORD;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegisterDto {
    @NotEmpty(message = "邮箱不能为空")
    @Pattern(regexp = EMAIL, message = "邮箱格式不正确")
    private String email;
    @NotEmpty
    private String username;
    @NotEmpty
//    @Pattern(regexp = PASSWORD, message = "密码格式不正确")
    private String password;
    @NotEmpty
    private String repassword;
    @NotEmpty(message = "验证码不能为空")
    private String ecode;
}
